﻿@model OnlyRecipesViewModel
<div id="recipe-search-results-container" data-onlyrecipes-url="@Url.Action("onlyrecipes")">
    @if (Model.Result != null && Model.Result.Any()) {
        <ul id="recipe-search-results">
            @foreach (var v in Model.Result) {
                <li>
                    <span style="margin-left:-0.5em;">
                        <span style="background:rgba(80,255,80, @v.Key.CssDecimal())">@v.Key.PercentageDisplay()</span>
                            of needed ingredients
                    </span>
                    @foreach (var r in v) {
                        @Html.DisplayFor(m => r.Recipe)
                    }
                </li>
            }
        </ul>
    }
</div>